import Demo2.text;

public class Duck extends text.Animal implements Iswim,Ifly{
    public Duck(String name, int age) {
        super(name, age);
    }

    @Override
    public void eat() {
        System.out.println(getName() + "正在吃鸭粮...");
    }

    @Override
    public void swim() {
        System.out.println(getName() + "正在游泳");
    }

    @Override
    public void fly() {
        System.out.println(getName() + "正在天上飞");
    }

}
